package view;

import java.awt.Point;
import java.awt.Color;

import javax.swing.JButton;

public class BoardButton extends JButton {
	private static final long serialVersionUID = 5721993818789303032L;
	
	private Point point;
	
	/**
	 * Class constructor
	 * @param name - the text label for the button
	 * @param p - the point associated with the button
	 * @param c - the background color of the button
	 */
	public BoardButton(String name, Point p, Color c) {
		super(name);
		setBackground ( c );
		this.point = p;
	}
	
	/**
	 * Class constructor
	 * @param p - the point associated with the button
	 * @param c - the background color of the button
	 */
	public BoardButton(Point p, Color c) {
		super();
		setBackground(c);
		this.point = p;
	}
	
	/**
	 * Returns the point associated with the button
	 * @return the point associated with the button
	 */
	public Point getLocation() {
		return new Point(point);
	}
}
